package com.vi.hcnetsdk.simpleapp;

import com.vi.hcnetsdk.jna.HCNetSDKByJNA;

import java.io.ByteArrayInputStream;

/**
 * Created by xulin9 on 2017/9/29.
 */

public class DataModal {
    //开锁参数
    public static class ControlLockData{
        int gateway_index;
        int lock_id;
        int lock_type;
        int control_type;
        String control_src;
        String passwd;
        int command;

        public ControlLockData() {
            gateway_index = 1;
            lock_id = 1;
            lock_type = 0;
            control_type = 1;
            control_src = null;
            passwd = null;
            command = 1;
        }

        public void init()
        {
            gateway_index = 1;
            lock_id = 1;
            lock_type = 0;
            control_type = 1;
            control_src = null;
            passwd = null;
            command = 1;
        }
    }


    //对讲参数
    public static class CallParams {
        DeviceManage.VI_CTRL_COMMAND commandType;
        short period;
        short buildingNumber;
        short unitNumber;
        short foorNumber;
        short roomNumber;
        short deviceIndex;
        int deviceType;

        public CallParams() {
            commandType = DeviceManage.VI_CTRL_COMMAND.REQUEST_CALL;
            period = 0;
            buildingNumber = 0;
            unitNumber = 0;
            foorNumber = 0;
            roomNumber = 0;
            deviceIndex = 0;
            deviceType = 0;
        }
    }


    //公告信息参数
    public static class NoticeData {
        int noticeLevel;
        String noticeNumber;
        String noticeTheme;
        String noticeDetail;
        int year;
        int month;
        int day;
        int hour;
        int minute;
        int second;
        byte[][] stream;
        int[] len;
        int picNum;

        public NoticeData(){
            picNum = 0;
            noticeLevel = 0;
            noticeNumber = null;
            noticeTheme = null;
            noticeDetail = null;
            year = 0;
            month = 0;
            day = 0;
            hour = 0;
            minute = 0;
            second = 0;
            len = new int[HCNetSDKByJNA.MAX_NOTICE_PIC_NUM];
            for (int i:len) {
                i = 0;
            }
            stream = new byte[HCNetSDKByJNA.MAX_NOTICE_PIC_NUM][];
        }
    }
}
